using UnityEngine;
using Unity.Entities;

public class BuildingTypeSoHolderAuthoring : MonoBehaviour
{
    public BuildingTypeSO.BuildingType buildingType;

    public class Baker : Baker<BuildingTypeSoHolderAuthoring>
    {
        public override void Bake(BuildingTypeSoHolderAuthoring authoring)
        {
            Entity entity = GetEntity(TransformUsageFlags.Dynamic);
            AddComponent(entity, new BuildingTypeSoHolder
            {
                buildingType = authoring.buildingType
            }) ;
        }
    }
}

public struct BuildingTypeSoHolder : IComponentData
{
    public BuildingTypeSO.BuildingType buildingType;
}